<template>
    <div style="background-color: #F7F7F7;">
       <div>
          <van-nav-bar
    title="设置"
    left-text="返回"
    left-arrow
    @click-left="onClickLeft"
  />
      </div>
      <div>
        <div style="margin-bottom: 1.5vh;"><van-cell title="长辈模式" is-link value="未开启.."/>
</div>
        <van-cell title="驾校合作" is-link value="" style="margin-bottom: 1.5vh;"/>
        <van-cell title="通用设置" is-link value="" style="margin-bottom: 1.5vh;"/>
        <van-cell title="题库功能" is-link value="" style="margin-bottom: 1.5vh;"/>
        <van-cell title="隐私和权限设置" is-link value="" />
        <van-cell title="隐私政策" is-link value="" /> 
        <van-cell title="个人信息收集清单" is-link value="" />
        <van-cell title="第三方信息共享清单" is-link value="" />
        <van-cell title="安全中心" is-link value="" style="margin-bottom: 1.5vh;"/>
        <van-cell title="检查更新" is-link value="" />
        <van-cell title="关于我们" is-link value="" />
    </div>
    <div id="next-a">
      <van-button round type="primary" size="large" color="linear-gradient(to right, #2CD6E8, #405FD8)" @click="userOut">退出登录</van-button>
    </div>
  </div>
     
  </template>
  
  <script>
 import { createApp } from 'vue';
import { NavBar } from 'vant';
import { useStore } from "vuex";
import { useRouter } from 'vue-router';

const app = createApp();
app.use(NavBar);

export default {
  setup() {
    const store = useStore()
    const router = useRouter()
    const onClickLeft = () => history.back();
    const userOut = ()=>{
      console.log(store.state.user)
      store.commit('updateUser','')
      store.commit('saveToken', '')
      console.log(store.state.user) 


      router.push('/')

    }
    return {
      onClickLeft,
      userOut,
      store,
    };
  },
}

  </script>
  
  <style lang="scss" scoped>
  #next-a{
  width: 80vw;
  margin: 1vh 10vw;
}
  </style>